home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / Third Party SDKs / ATI RAVE SDK / Samples / QD3D Tests / BackGround (ATI) / ATI / atimem.h < prev   
Encoding:
Text File  |  1998-05-21  |  2.8 KB  |  75 lines  |  [TEXT/CWIE]

  1. //    
  2. //  Filename: atimem.h
  3. //  $Revision:   1.0  $
  4. //
  5. //  Description: ATI Mem interface header file
  6. //
  7. //  Trade secret of ATI Technologies, Inc.
  8. //  Copyright 1997, ATI Technologies, Inc., (unpublished)
  9. //
  10. //  All rights reserved.  This notice is intended as a precaution against
  11. //  inadvertent publication and does not imply publication or any waiver
  12. //  of confidentiality.  The year included in the foregoing notice is the
  13. //  year of creation of the work.
  14. //
  15. //
  16. #ifndef ATIMEM_H
  17. #define ATIMEM_H
  18.  
  19. /************************************************************************/
  20. /* headers                                                              */
  21. /************************************************************************/
  22. #include <Quickdraw.h>
  23.  
  24. /************************************************************************/
  25. /* defines                                                              */
  26. /************************************************************************/
  27. #define ATIMEM_NO_INIT        NULL
  28. #define    ATIMEM_NO_BLIT        false
  29. #define ATIMEM_NO_CLIP        NULL
  30.  
  31. #define HAS_ATI_OFFSCREEN_MEM()                                            \
  32.     (((ProcPtr)ATIMem_AllocVRAM) != ((ProcPtr)(kUnresolvedCFragSymbolAddress)))
  33.  
  34. /************************************************************************/
  35. /* typedefs                                                                */
  36. /************************************************************************/
  37. typedef void (*MemCallBack)( GDHandle hGDevice, unsigned int flag, void *data );
  38.  
  39. #ifndef MEMMAN_H
  40. typedef enum {
  41.     kAllocOutOfSysMem         = (1 << 0),
  42.     kAllocOutOfVRAM         = (1 << 1),
  43.     kAllocPreCompactVRAM     = (1 << 2),
  44.     kAllocPostCompactVRAM     = (1 << 3),
  45.     kAllocModeSwitchNoClear = (1 << 4),
  46.     kAllocModeSwitchClear     = (1 << 5),
  47.     kAllocModeSwitch        = (3 << 4)      // kAllocModeSwitchNoClear | kAllocModeSwitchClear
  48. } EAllocStat;
  49. #endif
  50.  
  51. /************************************************************************/
  52. /* prototypes                                                           */
  53. /************************************************************************/
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57.  
  58. void     *ATIMem_AllocVRAM(    GDHandle hGDevice, unsigned long width, unsigned long height,
  59.                             unsigned long pixDepth, unsigned long *pRowBytes, void *init, 
  60.                             unsigned long blit, unsigned long blitLeft, unsigned long blitTop,
  61.                             RgnHandle clipRgn );
  62. void    ATIMem_FreeVRAM( GDHandle hGDevice, void *data );
  63. int     ATIMem_AdjustVRAM(    GDHandle hGDevice, void *data, void *init, unsigned long blit, 
  64.                             unsigned long blitLeft, unsigned long blitTop, RgnHandle clipRgn );
  65. int        ATIMem_RegHeapCallback( GDHandle hGDevice, MemCallBack callback, void *data );
  66. void    ATIMem_DeregHeapCallback( GDHandle hGDevice, int callbackIndex );
  67. long     ATIMem_GetFreeVRAM( GDHandle hGDevice );
  68. int     ATIMem_IsOnVRAM( GDHandle hGDevice, void *data );
  69.  
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73.  
  74. #endif
  75.